﻿Imports System.Text.RegularExpressions
Imports ajayumi.develop.win32.WebResourcesCatcher.Service
Imports System.Text

Public Class ResTaskInfo

    Private m_SiteTitle As String = String.Empty
    ''' <summary>
    ''' 站点标题
    ''' </summary>
    Public Property SiteTitle() As String
        Get
            Return m_SiteTitle
        End Get
        Set(ByVal value As String)
            m_SiteTitle = value
        End Set
    End Property


    Private m_SiteUrl As String = String.Empty
    ''' <summary>
    ''' 站点地址
    ''' </summary>
    Public Property SiteUrl() As String
        Get
            Return m_SiteUrl
        End Get
        Set(ByVal value As String)
            m_SiteUrl = value
        End Set
    End Property

    Private m_Domail As String
    Public ReadOnly Property Domail() As String
        Get
            Return Regex.Match(Me.m_SiteUrl, _
                               RegexPatten.Lock_HttpDomainExpression, _
                               RegexOptions.IgnoreCase Or RegexOptions.Singleline).Value
        End Get
    End Property


    Private m_SaveDir As String = String.Empty
    ''' <summary>
    ''' 保存目录 
    ''' </summary>
    Public Property SaveDir() As String
        Get
            Return m_SaveDir
        End Get
        Set(ByVal value As String)
            m_SaveDir = value
        End Set
    End Property

    Private m_IsAutoDownload As Boolean = False
    ''' <summary>
    ''' 是否自动下载
    ''' </summary>
    Public Property IsAutoDownload() As String
        Get
            Return m_IsAutoDownload
        End Get
        Set(ByVal value As String)
            m_IsAutoDownload = value
        End Set
    End Property

    Private m_IsTraversal As Boolean = True
    ''' <summary>
    ''' 遍历整站
    ''' </summary>
    Public Property IsTraversal() As String
        Get
            Return m_IsTraversal
        End Get
        Set(ByVal value As String)
            m_IsTraversal = value
        End Set
    End Property

    Private m_ImgWidthLB As Integer = 800
    ''' <summary>
    ''' 图片宽度的下限
    ''' </summary>
    Public Property ImgWidthLB() As Integer
        Get
            Return m_ImgWidthLB
        End Get
        Set(ByVal value As Integer)
            m_ImgWidthLB = value
        End Set
    End Property

    Private m_ImgHeightLB As Integer = 600
    ''' <summary>
    ''' 图片高度的下限
    ''' </summary>
    Public Property ImgHeightLB() As Integer
        Get
            Return m_ImgHeightLB
        End Get
        Set(ByVal value As Integer)
            m_ImgHeightLB = value
        End Set
    End Property

    Private m_MatchMode As MatchMode = MatchMode.OR
    ''' <summary>
    ''' 匹配模式
    ''' </summary>
    Public Property MatchMode() As MatchMode
        Get
            Return m_MatchMode
        End Get
        Set(ByVal value As MatchMode)
            m_MatchMode = value
        End Set
    End Property

    Private m_HtmlEncode As Encoding = Encoding.Default
    ''' <summary>
    ''' 页面编码
    ''' </summary>
    Public Property HtmlEncode() As Encoding
        Get
            Return m_HtmlEncode
        End Get
        Set(ByVal value As Encoding)
            m_HtmlEncode = value
        End Set
    End Property


End Class
